package com.RedRiver.hospitalsystem.personal_service.app.controller;


import com.RedRiver.hospitalsystem.personal_service.infra.model.Workload;
import com.RedRiver.hospitalsystem.personal_service.service.Form.NewWorkloadForm;
import com.RedRiver.hospitalsystem.personal_service.service.Form.WorkloadForm;
import com.RedRiver.hospitalsystem.personal_service.service.Form.WorkloadPageForm;
import com.RedRiver.hospitalsystem.personal_service.service.WorkloadService;
import com.RedRiver.hospitalsystem.personal_service.service.info.WorkloadPageInfo;
import com.RedRiver.hospitalsystem.result.Result;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 龙世超
 * @since 2022-04-26
 */
@RestController
@RequestMapping("/workload")
@Api(tags = "绩效工作量管理接口")
public class WorkloadController {

    @Autowired
    private WorkloadService workloadService;

    @ApiOperation("分页查看所有医生绩效")
    @PostMapping("/selPageWorkload")
    public Result<IPage> selWorkload(@RequestBody WorkloadPageForm form){
        IPage<WorkloadPageInfo> byPage = workloadService.findPageWorkload(form);
        return  Result.getInstance(IPage.class).setMsg("分页成功").setData(byPage);
    }

    @PostMapping("/createWorkload")
    public Result createWorkload(@RequestBody NewWorkloadForm newWorkloadForm){


        return null;
    }

    public Result updateWorkload(@RequestBody WorkloadForm workloadForm){

        return null;
    }

    public Result delWokload(){
        return null;
    }


}

